import React, { Component } from "react";
import styles from "./address.module.scss";
import {connect} from "react-redux"
import {withRouter} from "react-router-dom"
class map extends Component {
  render() {
    return (
      <div>
          {/* 顶部导航栏 */}
        <div className={styles.addAddress}>
          <div className={styles.topNavLeft}>
            <svg
              className={styles.icon}
              aria-hidden="true"
              onClick={() => {
                this.props.history.push("/address");
              }}
            >
              <use href="#icon-zuojiantou"></use>
            </svg>
          </div>
          <div className={styles.topNavCenter} style={{paddingRight:"40%",color:"#000"}}>确认收货地址</div>
        </div>
        {/* 搜索框 */}
        <div className={styles.search}>
              <div className={styles.inp}>
                  <span>广州 |<svg  className={styles.icon} aria-hidden="true">
                  <use href="#icon-sousuo"></use>
                  </svg></span><input type="text" placeholder="小区/写字楼/学校 等" />
              </div>
        </div>
        <div style={{ height: "400px" }} className="map">
          <iframe
            src="/map.html"
            frameBorder="0"
            title="ifm"
            style={{ width: "100%", height: "100%" }}
          ></iframe>
        </div>
        <div className={styles.mapList}>
          <div className={styles.item}>
              <div className={styles.mamListLeft}>
                <svg  className={styles.icon} aria-hidden="true">
                  <use href="#icon-dizhi"></use>
                </svg>
              </div>
              <div className={styles.mamListRight}>
                <h3>深圳西部硅谷</h3>
                <p>后瑞地铁站附近</p>
              </div>
          </div>
        </div>
      </div>
    );
  }
}

const mapStateToProps = (state) => {
    return {
      isLogin: state.userReducer.isLogin,
    };
  };
export default withRouter(connect(mapStateToProps, null)(map));
